/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.farent.solutions.common.discovery.ejbs;

import com.farent.solutions.common.discovery.AbstractClassResolverProcessor;
import java.util.ArrayList;
import java.util.List;
import javax.ejb.Stateful;
import javax.ejb.Stateless;
import javax.persistence.PersistenceContext;

/**
 *
 * @author Farouk.Alhassan
 */
public abstract class EjbsAnnotationsProcessor extends AbstractClassResolverProcessor
{
    @Override
    public List<Class> getAllAnnotations() {
        return Annotations.getAll();
    }
    
    public enum Annotations
    {
        PersistenceContext ( PersistenceContext.class ),
        Stateless ( Stateless.class ),
        Statefull ( Stateful.class );
        
        private final Class clazz;

        private Annotations ( Class clz )
        {
            clazz = clz;
        }

        public static List<Class> getAll(){
            List<Class> clazzes = new ArrayList<Class> ();
            for ( Annotations annotations : Annotations.values ())
            {
                clazzes.add ( annotations.clazz );
            }
            return clazzes;
        }
    }
}
